import { http } from "@/utils/http";
import { baseUrlApi } from "./urils";

interface Page {
  total: number;
  records: object;
}

interface Result {
  code: number;
  msg: string;
  data: Page;
}
export const getStatisticsInfoApi = data => {
  return http.request<Result>(
    "post",
    baseUrlApi("numberStatistics/statisticsOnDay"),
    {
      data
    }
  );
};

interface StatisticsTotal {
  amount: string;
  frequency: string;
}
interface StatisticsTotalResult {
  code: number;
  msg: string;
  data: StatisticsTotal;
}
export const getStatisticsTotalApi = data => {
  return http.request<StatisticsTotalResult>(
    "post",
    baseUrlApi("numberStatistics/statisticsTotal"),
    {
      data
    }
  );
};
